<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="/weixi/Public/css/bootstrap.min.css">
    <link rel="stylesheet" href="/weixi/Public/css/nivo-slider.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/bar/bar.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/dark/dark.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/default/default.css" type="text/css">
    <link rel="stylesheet" href="/weixi/Public/css/themes/light/light.css" type="text/css">
    <title>商城主页</title>
    <style>
        *{
            box-sizing: border-box;     /*从IE8开始兼容*/
            text-size-adjust:none;
        }
        img{
            max-width: 100%;
        }
        ul,li{
            list-style: none;margin: 0;padding:0;
        }
        html,body, .container{
            height:100%;margin:0;padding:0;
        }
        .container{
            max-width: 640px;min-width: 320px;margin: auto;
        }
        header{
            height:8%;background: #c53b13;display:flex;
        }
        section{
            height:92%;width: 100%;overflow: scroll;
        }
        .nivoSlider img{
            width: 100%;
        }
        .clear{
            clear:both;
        }
        .gw{
            width: 100%;  height: 40px;  background-color: #1c8de0;
        }
        .gw1{
            width: 33.33%;  height: 40px;  color: #c53b13;  line-height: 40px;
            text-align: center;  background-color: white;  border-width: 0 0 1px 0;  border-style: solid;  border-color: #c53b13;
        }
        .gw1{
            width: 33.33%;  height: 40px;  color: #c53b13;  line-height: 40px;  text-align: center;  font-family: 微软雅黑;
            background-color: white;  border-width: 0 0 1px 0;  border-style: solid;  border-color: #c53b13;  float: left;
        }
        .gw2{
            width: 33.33%;  height: 40px;  color: black;  line-height: 40px;  font-family: 微软雅黑;  text-align: center;  background-color: white;  float: left;
        }
        .cc1{
            width: 100%;  height: 250px;
        }
        .cc2{
            font-size: 80px;  color:grey ;  line-height: 250px;  text-align: center;
        }
        .cc3{
            height: 40px;  width: 100%;
        }
        .cc4{
            line-height: 40px;  text-align: center;  font-family: 微软雅黑;  font-size: 16px;
        }

        .section-content a:link{
            color: grey;text-decoration:none;font-size:13px;
        }
        .section-content a:visited {
            color:grey;text-decoration:none;font-size:13px;
        }
        .section-content  a:hover {
            color: #2536ff;font-size:13px;
        }
        .section-content-header div{
            width: 33.3%;
            float: left;
        }
        .section-content-body{
            background-color: #ebeced;
        }

        .shops-header{
            height: 20px;
            background-color: #ebeced;
        }
        .shops-body{
            height: 200px;
            background-color: #ffffff;
            border-radius: 10px;
        }
        .shops-body-header{
            height: 30px;
        }
        .shops-name{
            width: 200px;  font-size: 14px;
        }
        .shops-number{
            margin-top: 10px;  font-size: 16px;  color: red;  width: 200px;  float: left;
        }
        .shops-pay{
            margin-right: 20px;
            margin-top: 40px;
            float: right;
        }
        .shops{
            height: 200px;
        }
    </style>
    <script src="/weixi/Public/js/jquery-1.11.1.min.js"></script>
    <script src="/weixi/Public/js/bootstrap.min.js"></script>
    <script src="/weixi/Public/js/jquery.nivo.slider.js" type="text/javascript" charset="UTF-8" ></script>
    <script type="text/javascript">
        $(function () {
            $(".nivoSlider").nivoSlider();
            $("#return").click(function () {
                window.history.back(-1);
            })
        })
    </script>
</head>
<body>
<div class="container">
    <header>
        <div style="width: 16%;height: 100%;display: flex" id="return"><span class="glyphicon glyphicon-chevron-left" style="color: white;display: inline-block;margin: auto;font-size: 20px"></span></div>
        <div style="width: 70%;height: 100%;color: white;display: flex"><sapn style="display: inline-block;margin: auto;font-size: 20px">购物车</sapn></div>
    </header>
    <section>
        <div class="section-header" >
            <div class="gw">
                <div class="gw1">1.购物列表</div>
                <div class="gw2">2.确认订单</div>
                <div class="gw2">3.购买成功</div>
            </div>
        </div>
        <div class="section-content" >
            <php>if(empty($name)){</php>
            <div class="cc1">
                <div class="cc2"><span class="glyphicon glyphicon-shopping-cart"></span></div>
            </div>
            <div class="cc3">
                <div class="cc4">没有宝贝哦，不如去添加宝贝</div>
            </div>
            <a href="{:U('mains/index')}"><div style="background:#86c57d;height: 40px ;display: flex;width: 85%;margin: auto;border-radius: 5px">
                <div style="width: 45%;display: flex;"><span class="glyphicon glyphicon-circle-arrow-left" style="color: white;font-size: 18px;display: inline-block;margin: auto;margin-left: 85%;"></span></div>
                <div  style="width: 55%;color: white;font-size: 20px;line-height: 40px">去购物</div>
            </div></a>
            <php>}else{</php>
                <foreach name="name" item="names">
                    <php>if($names['f_time'] == null){</php>
                        <div>
                            <div class="section-content-body">
                                <div class="shops">
                                    <div class="shops-header"></div>
                                    <div class="shops-body">
                                        <!--<a href="{:U('Purchase/ers')}?id={$names.idit}"><sapn class="glyphicon glyphicon-remove-circle" style="font-size: 22px;color: #c9c9c9;float: right;margin-top: 3px;margin-right: 3px"></sapn></a>-->
                                        <a href="{:U('Purchase/ers')}?id={$names.inpus}"><sapn class="glyphicon glyphicon-remove-circle" style="font-size: 22px;color: #c9c9c9;float: right;margin-top: 3px;margin-right: 3px"></sapn></a>
                                        <div class="shops-body-header"></div>
                                        <div style="width: 100%;display: flex">
                                            <div style="width: 30%;height:110px;margin-left: 10px"><img src="/weixi/Public/imgs{$names.shopimg}" style="width: 100px;height:100px ;margin-left: 10px"></div>
                                            <div class="shops-name" style="width: 60%;height:110px;margin-left: 5%">
                                                <div style="margin-top: 5px "><span style="font-weight: bolder;font-size: 16px">{$names.shopname}</span></div>
                                                <div class="shops-number">￥<span style="font-weight: bolder">{$names.price}</span></div>
                                            </div>
                                        </div>
                                        <div style="width: 90%;height: 30px;margin: auto;display: flex;margin-top: 10px">
                                            <div style="width: 60%;font-weight: bolder;padding-left: 10px"><span>合计：</span><span style="color: red">￥{$names.price}</span></div>
                                            <a href="{:U('Main/rtyf')}?id={$names.idit}"><div style="width: 120px;height: 30px;background: #ff5458;color: white;text-align: center;line-height: 30px;font-size: 16px; margin-top: -10px">结算</div></a>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    <php>}else{</php>

                    <php>}</php>

                </foreach>
            <php>}</php>
        </div>
    </section>
</div>
</body>
</html>